package com.project.server.domain.estates;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.project.common.annotation.Excel;
import com.project.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 缴费记录对象 t_pay_record
 *
 * @author project
 * @date 2021-06-28
 */
public class TPayRecord extends BaseEntity {

    private static final long serialVersionUID = 3924679023108247868L;

    /**
     * 缴费记录编号
     */
    private Long payId;

    /**
     * 缴费单号
     */
    @Excel(name = "缴费单号")
    private String payOrder;

    /**
     * 缴费规则编号
     */
    private Long ruleId;

    /**
     * 缴费类型
     */
    @Excel(name = "缴费类型", readConverterExp = "00=物业费,01=水费,02=电费,03=气费,04=停车费")
    private String ruleType;

    /**
     * 企业id
     */
    private Long compId;

    /**
     * 企业名称
     */
    @Excel(name = "企业名称")
    private String compName;

    /**
     * 用户编号
     */
    private String userId;

    /**
     * 财务姓名
     */
    @Excel(name = "财务姓名")
    private String userName;

    /**
     * 电话
     */
    @Excel(name = "电话")
    private String userPhone;

    /**
     * 应缴金额
     */
    @Excel(name = "应缴金额")
    private BigDecimal pay;

    /**
     * 缴费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "缴费时间", dateFormat = "yyyy-MM-dd HH:mm")
    private Date payTime;

    /**
     * 未交金额
     */
    @Excel(name = "未交金额")
    private BigDecimal unpaid;

    /**
     * 缴费状态（0代表已交 2代表未交）
     */
    @Excel(name = "缴费状态", readConverterExp = "0=已交,2=未交")
    private String payStatus;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public void setPayId(Long payId) {
        this.payId = payId;
    }

    public Long getPayId() {
        return payId;
    }

    public String getPayOrder() {
        return payOrder;
    }

    public void setPayOrder(String payOrder) {
        this.payOrder = payOrder;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public Long getCompId() {
        return compId;
    }

    public void setCompId(Long compId) {
        this.compId = compId;
    }

    public String getCompName() {
        return compName;
    }

    public void setCompName(String compName) {
        this.compName = compName;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setPay(BigDecimal pay) {
        this.pay = pay;
    }

    public BigDecimal getPay() {
        return pay;
    }

    public String getRuleType() {
        return ruleType;
    }

    public void setRuleType(String ruleType) {
        this.ruleType = ruleType;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public BigDecimal getUnpaid() {
        return unpaid;
    }

    public void setUnpaid(BigDecimal unpaid) {
        this.unpaid = unpaid;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("payId", getPayId())
                .append("payOrder", getPayOrder())
                .append("ruleId", getRuleId())
                .append("ruleType", getRuleType())
                .append("comp", getCompId())
                .append("compName", getCompName())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("userPhone", getUserPhone())
                .append("pay", getPay())
                .append("payTime", getPayTime())
                .append("unpaid", getUnpaid())
                .append("payStatus", getPayStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
